package com.atguigu.userservice.service.client;

import com.atguigu.userservice.service.client.impl.SubjectClientImpl;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Component
@FeignClient(name = "service-rep", fallback = SubjectClientImpl.class)
public interface SubjectClient {

    @ApiOperation("根据id获取名字")
    @GetMapping("/repservice/subject/getNameById/{id}")
    public String getNameById(@PathVariable("id") String id);
}
